const baseUrl = 'https://api.opendota.com/api/'

export function get(url, params) {
	return new Promise((resolve, reject) => {
		uni.request({
				method: 'GET',
				url: baseUrl + url,
				data: params,
			}).then(res => {
				resolve(res[1])
			})
			.catch(err => {
				reject(err)
			})
	});
}
